package lec08.am;

import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

//5 1 3 1 6 3
//4 1 1 1 1
//6 1 2 2 1 5 6
public class P06b {
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		TreeSet<Integer> set = new TreeSet<Integer>();
		while (cin.hasNext()) {
			int n = cin.nextInt();
			for (int i = 0; i < n; i++) {
				set.add(cin.nextInt());
			}
			Iterator<Integer> it = set.iterator();
			while (it.hasNext())
				System.out.println(it.next());

		}
		cin.close();

	}

}
